package cn.eeepay.framework.util;

import javax.servlet.http.HttpServletResponse;
import java.io.UnsupportedEncodingException;

/**
 * 导出post请求方式通过 消息头返回信息给前端判断是否成功
 */
public class ExportResult {

    public static void setExportResult(HttpServletResponse response,boolean status,String msg){
        String msgFormat = null;
        try {
            msgFormat = new String(msg.getBytes("UTF-8"), "ISO-8859-1");
            response.setHeader("exportResult", "status="+status+";msg=" + msgFormat);
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
    }
}
